CC=/usr/bin/gcc
CFLAGS=-ggdb -Wall -lpcre
CCFLAGS=-Wno-missing-braces -lrt 
SRC=${wildcard *.c}
OBJ=${SRC:%.c=%.o}
PRO=${OBJ:%.o=%}

.PHONY:all

all:${PRO}
	
shm_open_w:shm_open_w.o
	${CC} -o $@  $< ${CFLAGS} -lrt

shm_open_r:shm_open_r.o
	${CC} -o $@  $< ${CFLAGS} -lrt

%:%.o
	${CC} -o $@ ${CFLAGS} $<

.PHONY:clean

clean:
	-rm ${PRO}
